<?php

class papelUsuario extends FDefaultModel
{
    
    public function getForm()
    {
        $selection = new FSelection('cod_papel', 'Papel do usuário');
        $selection->setTable('papel');
        
        $form = new FForm();
        $form->setModel('papelUsuario');
        $form->setHeight(150);
        $form->addFormField($selection);
        
        $form->addFormButton(new FButton(rand(), 'Adicionar', 'teste'));
        
        return $form;
    }
    
    public function teste($args)
    {
        FUtil::debug($args);
        
        $response = new FJSONResponse();
        $response->setSuccess(false);
        $response->setMsg('O usuário ou a senha informados está incorreto!');
        
        return $response;
    }
    
}


?>
